package com.xiaouyudeguang.common.utils;

public class Status {

    /**
     * 正常的
     */
    public static final Long NORMAL = 0L;

    /**
     * 正常的
     */
    public static final Long ABNORMAL = 1L;

    /**
     * 有效的
     */
    public static final int ACTIVE = 0;

    /**
     * 无效的
     */
    public static final int INVALID = 1;

    public static boolean isActive(int code) {
        return ACTIVE == code;
    }

    public static boolean isInvalid(int code) {
        return ACTIVE != code;
    }

    public static boolean toBoolean(int i) {
        return 0 == i;
    }

    public static int parseInt(boolean status) {
        return status ? 0 : 1;
    }
}
